import time
from public.action import *
from public.business import *
from public.testData import *
from public.tools import *

testCase="DBshop029_删除标签组"
# 登录后台管理系统,地址是"http://localhost/dbshop/admin",
firefox=openBrowser("http://localhost/dbshop/admin")
firefox.get(urlAdmin)
#调用自定义函数进行后台的登录
DBshopLoginAdmin(firefox)
#进入回复评价界面
DBshopEnterMenu3(firefox,"商品管理","商品标签","商品标签分组")
#定位删除按钮
firefox.find_element_by_xpath("//a[text()='删除']").click()
#c处理js弹窗
firefox.switch_to.alert.accept()


#断言
try:
    firefox.find_element_by_xpath("//td[contains(.,'好好学习')]")
    writeLog("%s 测试失败"%testCase)
except:
    writeLog("%s 测试成功" % testCase)
    getPhoto(firefox)